#!/bin/bash
# linux server 直接通过lacp把物理上的两根网线通过lacp链路聚合为一根连接到华为CE12800交换机上
source ../ovs_helper.sh

boot(){

        qemu-system-x86_64 \
                -enable-kvm \
                 -cpu host \
                -smp 2,sockets=1,cores=2,threads=1 \
                -m 4G \
                -machine q35,accel=kvm \
                -cdrom ../slax-64bit-debian-12.2.0.iso \
                -device virtio-net-pci,netdev=nat1 \
                -netdev user,id=nat1 \
                -vnc 0.0.0.0:1$1,password=off \
                -device e1000,netdev=net1,mac=a0:51:00:00:11:0$1 \
                -netdev tap,id=net1,ifname=$2,script=no,downscript=no \
                -daemonize  \
                -device e1000,netdev=net2,mac=a0:51:00:00:22:0$1 \
                -netdev tap,id=net2,ifname=$3,script=no,downscript=no
  #-bios /usr/share/ovmf/OVMF.fd \

  #-drive file=./linux.qcow2,if=virtio,cache=writeback,format=qcow2 \

}


#add_ovs_tap_pair br1 tap1 tap2


#add_ovs_tap_pair br2 tap21 tap22

boot 0 tap_ce_b_0 tap_ce_b_1
#boot 1 tap2 tap22
